package geppetto.phraseTable.builder;

import geppetto.phraseTable.PhraseTable;
import geppetto.phraseTable.phrase.Phrase;

public class MemoryPhraseWriter extends PhraseWriter{

	PhraseTable phraseTable;
	
	public MemoryPhraseWriter(PhraseTable phraseTable) {
		super();
		this.phraseTable = phraseTable;
	}

	@Override
	public void writePhrase(Phrase p) {
		phraseTable.insertPhrase(p, p.getSourceLen() , p.getTargetLen());
	}

}
